/***********************************************************************
 * Module:  Player.java
 * Author:  William
 * Purpose: Defines the Class Player
 ***********************************************************************/

import java.util.*;

/** @pdOid fc4b7acb-31c1-4ea2-8d23-f73bad6dddc3 */
public class Player {
   /** @pdOid 39599a37-ec00-472f-8861-43fa9ccc9ba4 */
   private String Name;
   /** @pdOid 06c07ae5-d1f1-41c0-b39c-ec6e79a408ea */
   protected List<Card> handcards;
   
   private boolean isLord = false;
   
   public Player(String name)
   {
	   this.Name = name;
	   handcards = new ArrayList<Card>();
   }
   /** @param card
    * @pdOid 0ca0fea7-d29a-4cff-b632-fdeb7d70ac51 */
   public void zhuapai(Card card) {
      // TODO: implement
	   handcards.add(card);
   }
   
   /** @pdOid 415163c9-69c0-49ce-95ef-6df46380be09 */
   public Card chupai() {
      Random r =new Random();
      int x = r.nextInt(handcards.size());
      Card c =handcards.remove(x);
      System.out.println(Name+ ( isLord?"(Lord) ":" ")+c.CardText);
      return c;
   }
public boolean isLord() {
	return isLord;
}
public void setLord(boolean isLord) {
	this.isLord = isLord;
}

}